package jdk8特性_壹证通公司面试.方法引用;

public class DemoPrint {

    private static void printString(MyPrintable data){
        data.f("WSInterface,World");
    }

    public static void main(String[] args) {
        printString(s->System.out.println(s));
        printString(System.out::println);

        printString(new MyPrintable() {
            @Override
            public void f(String str) {
                System.out.println(str);
            }
        });
    }
}
